package com.hmall.order;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
import com.hmall.common.feign.SearchClient;
import com.hmall.order.pojo.Order;
import com.hmall.order.pojo.OrderDetail;
import com.hmall.order.service.IOrderService;

import com.hmall.order.service.IOrderdetailService;
import com.hmall.order.service.OrderLogisticsService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;


import java.util.Date;

/**
 * @Author dml
 * Date on 2022/7/14 0014
 */


@SpringBootTest
public class test {
    @Autowired
    private IOrderService orderService;
    @Autowired
    private IOrderdetailService iOrderdetailService;
    @Autowired
    private OrderLogisticsService orderLogisticsService;


    @Autowired
    private SearchClient searchClient;


    @Test
    public void testFindOrder() {
        Order order = orderService.getById(997333881256411136L);


//        OrderDetail byId1 = iOrderdetailService.getById(31);

        LambdaUpdateWrapper<OrderDetail> qw = new LambdaUpdateWrapper<>();
        qw.eq(OrderDetail::getOrderId,order.getId());
        OrderDetail one = iOrderdetailService.getOne(qw);


        System.out.println("===============================================================");
        System.out.println(one.getNum());
//        System.out.println(one.getNum().toString());

        System.out.println("===============================================================");

//        System.out.println(order);
    }







}
